﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1.DesignerPatter.Visitor
{
    public class Program5
    {
        public static void Main()
        {
            //---------test---文件夹下测试开始
            //Person p = new Man();
            //p.Reaction("成功");
            //p.Reaction("失败");
            //p = new Women();
            //p.Reaction("成功");
            //p.Reaction("失败");
            //Console.Read();
            //---------test---文件夹下测试结束

            ObjectStructure os = new ObjectStructure();
            os.Add(new Man());
            os.Add(new Women());

            os.Display(new Success());
            os.Display(new Failing());
            Console.Read();
        }
    }
}
